<cfparam name = "dir" default="docs/">
<h3>Upload Files</h3>
<strong>Files will upload to:</strong> <cfoutput>#dir#</cfoutput>
<br />
(File size limit is 175 MB and you need Adobe Flash Player installed to use this feature)
<!--- Code you can use for CF9 if you want to use the built-in CF9 upload utility.  This is not enabled by default for compatability reasons
<cfparam name = "dir" default="docs/">
<p>
<cfif isdefined("form.FIELDNAMES")> 
      <cffile action = "upload" destination = "#request.basepath##dir#" nameconflict="makeunique"> 
</cfif> 
<cffileupload name="myuploader" height="400" width="600" url="#cgi.script_name#?#cgi.QUERY_STRING#">
</p>
<cfoutput><p><a href="index.cfm?c=filemanager&dir=#dir#">Go Back to the File Manager</a></p></cfoutput>
--->
<br />
<cfoutput>
<script type="text/javascript">
$(document).ready(function() {
  $('##file_upload').uploadify({
    'uploader'  : '#request.absolutepath#js/uploadify/uploadify.swf',
    'script'    : '#request.absoluteadminpath#upload/upload.cfm',
    'cancelImg' : '#request.absolutepath#images/defaults/cancel.png',
    'folder'    : '#request.absolutepath##dir#',
  	'scriptData': {'filepath':'#request.downloadspath#','dir':'#dir#'},
    'auto'      : true,
	'multi'		: true,
	'queueSizeLimit' : 20,
	'sizeLimit' : 183500800,
	'onAllComplete' : function(event,data) {window.location.href = 'index.cfm?c=accounts&a=downloads&dir=#dir#'}	
  });
});
</script>
</cfoutput>
Click the button below to select files from you computer.  Uploads will automatically begin.
<p>
<input id="file_upload" name="file_upload" type="file" />  
</p>
<p>
<a href="javascript: expandcollapse('fileupload');">Cancel and Hide Upload</a>
</p>
